<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateUsuarioTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateUsuarioLabel_nick}" for="nick" />
                    <h:inputText id="nick" value="#{usuarioController.selected.nick}" title="#{bundle.CreateUsuarioTitle_nick}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_nick}"/>
                    <h:outputLabel value="#{bundle.CreateUsuarioLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{usuarioController.selected.nombre}" title="#{bundle.CreateUsuarioTitle_nombre}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_nombre}"/>
                    <h:outputLabel value="#{bundle.CreateUsuarioLabel_apellido}" for="apellido" />
                    <h:inputText id="apellido" value="#{usuarioController.selected.apellido}" title="#{bundle.CreateUsuarioTitle_apellido}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_apellido}"/>
                    <h:outputLabel value="#{bundle.CreateUsuarioLabel_identificacion}" for="identificacion" />
                    <h:inputText id="identificacion" value="#{usuarioController.selected.identificacion}" title="#{bundle.CreateUsuarioTitle_identificacion}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_identificacion}"/>
                    <h:outputLabel value="#{bundle.CreateUsuarioLabel_contrasena}" for="contrasena" />
                    <h:inputText id="contrasena" value="#{usuarioController.selected.contrasena}" title="#{bundle.CreateUsuarioTitle_contrasena}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_contrasena}"/>
                    <h:outputLabel value="#{bundle.CreateUsuarioLabel_responsable}" for="responsable" />
                    <h:inputText id="responsable" value="#{usuarioController.selected.responsable}" title="#{bundle.CreateUsuarioTitle_responsable}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_responsable}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{usuarioController.create}" value="#{bundle.CreateUsuarioSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{usuarioController.prepareList}" value="#{bundle.CreateUsuarioShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateUsuarioIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
